package com.example.xd.javatest.java_rx_test2;

import java.util.Observable;

/**
 * @auther XuDan on 2020/6/22.
 */
public class Client {
    public static void main(String[] args) {
        Observable javaObservable = new JavaObservable();

        JavaObserver javaObserver = new JavaObserver();

        javaObservable.addObserver(javaObserver);
        ((JavaObservable) javaObservable).setChanged();//必须要设置,否则内部判断不会通知
        javaObservable.notifyObservers("我来了");

    }
}
